package org.example.m7_16;

import java.util.Scanner;


public class Test1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        int count = 0;
        int max = 0;
        int right = 0;
        String maxNum = "";
        int l = str.length();
        for (int i = 0; i < l; i++) {
            char c = str.charAt(i);
            if (c >= '0' && c <= '9'){
                if (count == 0){
                    right = i;
                }
                count++;
            }else {
                if (count > 0 && max < count){
                    maxNum = str.substring(right,i);
                    count = 0;
                }
            }
            if (i + 1 == l){
                if (count > 0 && max < count){
                    maxNum = str.substring(right,i+1);
                }
            }
        }
        System.out.println(maxNum);
    }

}
